package com.warehouse.module.business.controller.admin.cargoplan.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.warehouse.module.business.controller.admin.cargoplan.convert.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Schema(description = "管理后台 - 货物资料 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CargoPlanExcelRespVO {

    @Schema(description = "进仓编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31160")
    @ExcelProperty("进仓编号")
    private String orderId;

    @Schema(description = "主单号目的地", requiredMode = Schema.RequiredMode.REQUIRED, example = "土阿莫土群岛(太平洋)")
    @ExcelProperty("主单号目的地")
    private String destinationCityName;

    @Schema(description = "主单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "16278")
    @ExcelProperty("主单号")
    private String mainOrderId;

    @ExcelProperty("分单号目的地")
    private String subDestCityName;
    /**
     * 分单号
     */
    @Schema(description = "分单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("分单号")
    private String subOrderId;

    @Schema(description = "件数", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("件数")
    private Long warehouseNumber;

    /**
     * 重量kg
     */
    @Schema(description = "重量kg", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("重量k")
    private BigDecimal weight;

    /**
     * 体积
     */
    @Schema(description = "体积", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("体积")
    private BigDecimal volume;

    /**
     * 航班号
     */
    @ExcelProperty("航班号")
    private String flightNumber;

    /**
     * 航班时间
     */
    @ExcelProperty(value = "航班时间", converter = DateConverter.class)
    private Date flightDate;

    /**
     * 装载
     */
    @ExcelProperty("装载")
    private String freight;

    @Schema(description = "品名/型号（多个逗号分开）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("品名")
    private String productNameMode;

    @ExcelProperty("客服")
    private String serviceName;
    /**
     * 通关
     */
    @Schema(description = "通关", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("通关")
    private String customsClearance;

    /**
     * rac
     */
    @ExcelProperty(value = "RAC", converter = RacConvert.class)
    @ColumnWidth(10)
    private Integer rac;

    /**
     * 地服 CA/BGS
     */
    @Schema(description = "地服 CA/BGS", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "地服(CA/BGS)", converter = TheGroundConvert.class)
    private Integer theGround;

    @ExcelProperty(value = "是否通过仓库(货物出仓形式)", converter = StorageConvert.class)
    private Integer storage;

    @ExcelProperty(value = "是否随机", converter = RandomFlagConvert.class)
    private Integer randomFlag;

    @ExcelProperty("备注")
    private String note;

}